/*
 * Copyright (C) 2022 KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef APPCATEGORYMANAGER_H
#define APPCATEGORYMANAGER_H

#include <QObject>
#include "types.h"

class AppCategoryManager : public QObject
{
    Q_OBJECT
public:
    explicit AppCategoryManager(QObject *parent = nullptr);

    QList<int> matchingAppCategories(const QString &category) const;

    UKUI::CategoryStringMap softwareAppCategory() const
    { return m_softwareAppCategory; }

    static QString categoryToString(int value);
    static QStringList categoryStringList();
    static QList<int> categoryIntList();

Q_SIGNALS:
    void softwareAppCategoryUpdated();

private Q_SLOTS:
    void updateSoftwareStoreAppCategory(const QString &categray);

private:
    UKUI::CategoryStringMap m_softwareAppCategory;

};

#endif // APPCATEGORYMANAGER_H
